/*
  Copyright (C) 2002 Laurent Martelli <laurent@aopsys.com>

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU Lesser General Public License as
  published by the Free Software Foundation; either version 2 of the
  License, or (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU Lesser General Public License for more details.

  You should have received a copy of the GNU Lesser General Public
  License along with this program; if not, write to the Free Software
  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
  USA */

package org.objectweb.jac.ide;

import java.io.File;

/**
 * An error generated by the compilator
 */

public class Error {

    File file;
    int line = 0;
    String message;
    Class cl;
   
    /**
     * Creates an error message with no associated file,class or line number
     */
    public Error(String message) {
        this.message = message;      
    }

    public Error(String fileName, int line, String message, Class cl) {
        this.file = new File(fileName);
        this.line = line;
        this.message = message;
        this.cl = cl;
    }
   
    public Class getCl() {
        return cl;
    }

    public int getLine() {
        return line;
    }

    public String message() {
        return message;
    }

    public String toString() {
        return message;
    }
}
